package org.edu.modules.oa.controller;

import com.github.xiaoymin.knife4j.annotations.ApiSort;
import groovy.util.logging.Slf4j;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.edu.common.api.vo.Result;
import org.edu.common.aspect.annotation.AutoLog;
import org.edu.modules.oa.entity.VeUserEntity;
import org.edu.modules.oa.service.IVeOaCarInfoService;
import org.edu.modules.oa.service.IVeUserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Api(tags="查看系统人员")
@RestController
@RequestMapping("oa/sysUser")
@Slf4j
@ApiSort(value = 100)
public class VeUserController {
    @Resource()
    private IVeUserService iVeUserService;
    //日志注解
    @AutoLog(value = "查看所有用户")
    //(value = “接口说明”, httpMethod = “接口请求方式”, response = “接口返回参数类型”, notes = “接口发布说明”）
    @ApiOperation(value="查看所有用户", notes="查看所有用户")
    //映射一个POST请求
    @PostMapping(value = "/getUser")
    //展示表格
    public Result<?> getSysUser(){
        List<VeUserEntity> list =  iVeUserService.getSysUserList();
        return Result.OK(list);

    }

}
